<?php
namespace ZHMVC\TOOL;
if (! isset($_SESSION)) {
    session_start();
}
include(dirname(dirname(dirname(dirname(__FILE__))))."/zhconfig/Config.php");
$action=SafeRequest(getPGC('atcion'),0);
$formname=SafeRequest(getPGC('formname'),0);
$frominputname=SafeRequest(getPGC('frominputname'),0);
switch ($action)
{
    case "save":
        save($formname,$frominputname);
        break;
    default:
        main($formname,$frominputname);
}

function main($formname,$frominputname)
{
    $up=new \ZHMVC\B\TOOL\ClsUploadExcel($formname,$frominputname);
    echo $up->getHtml("userfile");
}
function save($formname,$frominputname)
{
    $up=new \ZHMVC\B\TOOL\ClsUploadExcel($formname,$frominputname);
    echo $up->saveFile($_FILES, ZH_PATH. DS ."upload", $formname, $frominputname,"/upload");
}
